[PATCH] sunjre: check all four possible OpenJDK variants for libjvm.so
authorWANG Xuerui <xen0n@gentoo.org>
Thu, 22 Aug 2024 06:22:49 +0000 (14:22 +0800)
committerRene Engelhard <rene@debian.org>
Tue, 8 Oct 2024 15:43:46 +0000 (17:43 +0200)
commit4fe06e7c90b5d0826833cd8eee72669c8ef66de9
tree0e1460e823e36d6a3d70791a4d4b8cc190d0fe50
parenta8e4813127cb795a1a58e595856ab4e3c22cbcbc
[PATCH] sunjre: check all four possible OpenJDK variants for libjvm.so

Since OpenJDK 21, the "minimal" and "zero" variants of JVM no longer
reside in the "server" directory in $JAVA_HOME/lib, making the loader
unable to find libjvm.so. This regresses LO builds on platforms with
only those variants of JVM (i.e. without a HotSpot port).

Example error message is like this:

> exception occurred: Could not create Java implementation loader at
> ./stoc/source/javaloader/javaloader.cxx:551

Fix it by probing all four possible variant directories for libjvm.so.
This is tested on Debian unstable (loong64 port) to fix the packaging.

Link: https://bugs.openjdk.org/browse/JDK-8273494
Link: https://github.com/openjdk/jdk/pull/5440
Link: https://github.com/openjdk/jdk/commit/8fbcc8239a3fc04e56ebbd287c7bb5db731977b7
Change-Id: I3545f93054d7a3af0181e4c739c82efaaf8aeaed

Gbp-Pq: Name jdk-minimal-and-zero-paths.diff
jvmfwk/plugins/sunmajor/pluginlib/sunjre.cxx